<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- | An architecture independent description of a register's class.</span><span>
</span><span id="line-2"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Platform.Reg.Class</span><span>
</span><span id="line-3"></span><span>        </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier">RegClass</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-keyword">where</span><span>
</span><span id="line-6"></span><span>
</span><span id="line-7"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Outputable</span></span><span>
</span><span id="line-10"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-comment">-- | The class of a register.</span><span>
</span><span id="line-14"></span><span class="hs-comment">--      Used in the register allocator.</span><span>
</span><span id="line-15"></span><span class="hs-comment">--      We treat all registers in a class as being interchangeable.</span><span>
</span><span id="line-16"></span><span class="hs-comment">--</span><span>
</span><span id="line-17"></span><span class="hs-keyword">data</span><span> </span><span id="RegClass"><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-var">RegClass</span></a></span></span><span>
</span><span id="line-18"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="RcInteger"><span class="annot"><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span></span><span>
</span><span id="line-19"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="RcFloat"><span class="annot"><a href="GHC.Platform.Reg.Class.html#RcFloat"><span class="hs-identifier hs-var">RcFloat</span></a></span></span><span>
</span><span id="line-20"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="RcDouble"><span class="annot"><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span></span><span>
</span><span id="line-21"></span><span>        </span><span class="hs-keyword">deriving</span><span> </span><span id="local-6989586621680936232"><span id="local-6989586621680936234"><span class="annot"><span class="annottext">RegClass -&gt; RegClass -&gt; Bool
(RegClass -&gt; RegClass -&gt; Bool)
-&gt; (RegClass -&gt; RegClass -&gt; Bool) -&gt; Eq RegClass
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: RegClass -&gt; RegClass -&gt; Bool
$c/= :: RegClass -&gt; RegClass -&gt; Bool
== :: RegClass -&gt; RegClass -&gt; Bool
$c== :: RegClass -&gt; RegClass -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Uniquable"><span class="hs-identifier hs-type">Uniquable</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-25"></span><span>    </span><span id="local-6989586621680936227"><span class="annot"><span class="annottext">getUnique :: RegClass -&gt; Unique
</span><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var hs-var hs-var hs-var">getUnique</span></a></span></span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegClassUnique"><span class="hs-identifier hs-var">mkRegClassUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-26"></span><span>    </span><span class="annot"><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcFloat"><span class="hs-identifier hs-var">RcFloat</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegClassUnique"><span class="hs-identifier hs-var">mkRegClassUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-27"></span><span>    </span><span class="annot"><a href="GHC.Types.Unique.html#getUnique"><span class="hs-identifier hs-var">getUnique</span></a></span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Unique
</span><a href="GHC.Types.Unique.html#mkRegClassUnique"><span class="hs-identifier hs-var">mkRegClassUnique</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621680936222"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.Class.html#RegClass"><span class="hs-identifier hs-type">RegClass</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-30"></span><span>    </span><span id="local-6989586621680936220"><span class="annot"><span class="annottext">ppr :: RegClass -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcInteger"><span class="hs-identifier hs-var">RcInteger</span></a></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">Outputable.text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;I&quot;</span></span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcFloat"><span class="hs-identifier hs-var">RcFloat</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">Outputable.text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;F&quot;</span></span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">RegClass
</span><a href="GHC.Platform.Reg.Class.html#RcDouble"><span class="hs-identifier hs-var">RcDouble</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">Outputable.text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;D&quot;</span></span><span>
</span><span id="line-33"></span></pre></body></html>